﻿

namespace System.Extensions.Windows.Forms.Design
{
  using System;
  using System.ComponentModel;
  using System.Globalization;

  internal class WizardPageCollectionEnumConverter : TypeConverter
  {
    public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
    {
      WizardPageCollection pages = (WizardPageCollection)value;
      return pages[pages.Owner.CurrentPageIndex].Name;
    }
  }
}
